package com.tmc.web.controller.intair;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.tmc.bean.common.CommonResult;
import com.tmc.bean.common.ContextInfo;
import com.tmc.entity.intair.PrivateFare;
import com.tmc.service.intair.ToolServiceImpl;
import com.tmc.web.BaseController;

@Controller
@RequestMapping("/tool")
public class PrivateFareCreaterController extends BaseController {

	@Autowired
	private ToolServiceImpl toolService;

	@RequestMapping(value="/privatefare-create-page",method=RequestMethod.GET)
	public ModelAndView privatefareCreatePage(HttpServletRequest request){
		ContextInfo context = this.getContextInfo(request);
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("policy", new PrivateFare());
		map.put("context", context);
		return new ModelAndView("views/tool/privatefare-creater",map);
	}  
	
//	@RequestMapping(value = "/privatefare-create", produces = "text/html;charset=UTF-8")
//	@ResponseBody
//	public String privatefareCreate(PrivateFare policy) {
//		CommonResult result = toolService.privatefareCreate(new ContextInfo(), policy);
//		return result.toJson();
//	}
}
